home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Developer Helper 1: Phil & Dave's Excellent CD
/
Excellent CD HFS.raw
/
HyperCard
/
HyperCard 1.2.2 International
/
HyperCard Dutch (K-1.2.2)
/
Meer stapels
/
Verkoopresultaten
/
card_3600.txt
< prev
next >
Wrap
Text File
|
1988-12-21
|
3KB
|
110 lines
-- card: 3600 from stack: in
-- bmap block id: 2439
-- flags: 0000
-- background id: 2620
-- name:
-- part 1 (button)
-- low flags: 00
-- high flags: A002
-- rect: left=433 top=277 right=301 bottom=509
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Bijwerken
----- HyperTalk script -----
on mouseUp
put the userLevel into saveLevel
if the userLevel < 3 then set userLevel to 3 -- "Painting"
if the userLevel < 3 then exit mouseUp
put frameBottom()-frameHeight()+10 into pieTop
put frameLeft()+5 into pieLeft
put frameHeight()-20 into pieDiameter
clearScreen
reset paint
choose oval tool
set lineSize to 2
set dragSpeed to 0
drag from pieLeft,pieTop to pieLeft+pieDiameter, pieTop+pieDiameter
set centered to false
put the number of lines in field "Data" into dataCount
put zero into total
repeat with i = 1 to dataCount
add line i of field "Data" to total
end repeat
put "Totaal is" && total into background field "Total"
put pieDiameter div 2 into pieRadius
put pieLeft+pieRadius into pieCenterX
put pieTop+pieRadius into pieCenterY
choose line tool
put zero into angle
put zero into change
repeat with i = 1 to dataCount+1
put pieCenterX + round(pieRadius * sin(angle)) into x
put pieCenterY - round(pieRadius * cos(angle)) into y
choose line tool
drag from pieCenterX,pieCenterY to x,y
if change > .02 then
set pattern to getPattern(i)
choose bucket tool
click at halfX, halfY
end if
get line i of field "data"
put pi * it / total into change
add change to angle
put pieCenterX + round((pieRadius-3) * sin(angle)) into halfX
put pieCenterY - round((pieRadius-3) * cos(angle)) into halfY
add change to angle
end repeat
reset paint
choose browse tool
set userLevel to saveLevel
end mouseUp
function getPattern selector
return item (selector mod 12)+1 of "2,13,11,3,14,6,21,17,31,18,4,32"
end getPattern
-- part 2 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=477 top=29 right=48 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name:
-- part contents for background part 5
----- text -----
35
35
30
-- part contents for background part 9
----- text -----
Totaal is 100
-- part contents for background part 11
----- text -----
Omzetverdeling in klantenbudget